package xju.rjxy.shop.service.impl;

import xju.rjxy.shop.mapper.CommunityMapper;
import xju.rjxy.shop.mapper.impl.CommunityMapperImpl;
import xju.rjxy.shop.model.domain.CommunityPost;
import xju.rjxy.shop.service.ICommunityService;

import java.util.List;

public class CommunityServiceImpl implements ICommunityService {
    
    private final CommunityMapper communityMapper = new CommunityMapperImpl();
    
    @Override
    public List<CommunityPost> getCommunityPosts() {
        return communityMapper.getCommunityPosts();
    }
    
    @Override
    public CommunityPost getPostById(int id) {
        return communityMapper.getPostById(id);
    }
    
    @Override
    public boolean createPost(CommunityPost post) {
        return communityMapper.createPost(post) > 0;
    }
} 